﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GKQC.DbHelper.AppViews
{
    /// <summary>
    /// API返回值
    /// </summary>
    [Serializable]
    [Description("API返回类")]
    public class ReturnValue
    {
        /// <summary>
        /// 无参构造函数
        /// </summary>
        [Description("无参构造函数")]
        public ReturnValue()
        {
            this.Code = 1001;
            this.Msg = string.Empty;
        }

        /// <summary>
        /// 有参构造函数
        /// </summary>
        /// <param name="code"></param>
        /// <param name="msg"></param>
        /// <param name="data"></param>
        [Description("有参构造函数")]
        public ReturnValue(int code, string msg, object data )
        {
            this.Code = code;
            this.Msg = msg;
            this.Data = data;
        }

        /// <summary>
        /// 代号: 成功1001  失败1002  token过期1098  异常1099
        /// </summary>
        [Description("返回结果代号")]
        public int Code { get; set; }
        /// <summary>
        /// 提示信息
        /// </summary>
        [Description("提示信息")]
        public string Msg { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        [Description("数据")]
        public object Data { get; set; }
    }
}
